﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
using BlogModel;


namespace Blog.Models
{
    public class PostModel
    {
        [Required]
        public int PostId { get; set; }

        [Required]
        [DataType(DataType.Text)]
        [StringLength(200)]
        [Display(Name = "Rubrik")]
        public string Title { get; set; }

        [DataType(DataType.MultilineText)]
        [StringLength(5000)]
        [Display(Name = "Innehåll")]
        public string Content { get; set; }

        [DataType(DataType.DateTime)]
        [Display(Name = "Datum")]
        public System.DateTime CreationDate { get; set; }

        [DataType(DataType.ImageUrl)]
        [Display(Name = "Utvald bild")]
        public string FeaturedImage { get; set; }

        [DataType(DataType.Upload)]
        public HttpPostedFileBase ImageUpload { get; set; }

        [Required]
        public int BlogId { get; set; }

        public int UserId { get; set; }

        public List<CommentModel> Comments { get; set; }

        public CommentModel Comment { get; set; }



        //Lagt till 140513 kvällen

        public User Users { get; set; }

        public BlogModel.Blog Blogs { get; set; }

        public List<Post> Posts { get; set; }
        public List<BlogRoll> BlogRolls { get; set; }

        public Post Post { get; set; }

    }
}